//
//  EWxmlNode.h
//  mkMapTest0
//
//  Created by 鱼 bin on 12-6-5.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "EWxmlDocument.h"

@interface EWxmlNode : NSObject {
	EWxmlDocument* document;
	int dataBegin;
	int dataEnd;    //指向末尾后一个
	BOOL isRootNode;
	
	int nodeContentHeaderBegin;  //包含头的指向
	int nodeContentHeaderEnd;
	
	NSMutableDictionary* arributes;  //属性 类似<node  name = "hello">axxxx</node>
}

+(id)xmlNode:(EWxmlDocument*)doc;
-(id)initWithDocument:(EWxmlDocument*)doc;

+(id)xmlRootWithPath:(NSString*)path;
-(id)initRootWithPath:(NSString*)path;

-(void)collectAtrributes:(NSString*)key;
-(NSMutableDictionary*)getAtrributes;
-(NSMutableArray*)getSubNodes:(NSString*)key;
-(NSMutableArray*)splitContentWith:(NSString*)sep;
-(EWxmlDocument*)getDocument;
-(int)getDataBegin;
-(int)getDataEnd;
-(void)setDataBegin:(int)begin;
-(void)setDataEnd:(int)end;
-(void)setDocument:(EWxmlDocument*)doc;
-(int)getDataLength;
-(NSString*)getNodeContentString;
-(void)setRoot;


@end
